﻿using System;
using System.Collections;
using System.Linq.Expressions;
using Castle.MonoRail.Framework;

namespace Castle.MonoRail.ExtensionMethods {
	public interface IUtils {
		/// <summary>
		/// Url encoded GetActionParameters
		/// </summary>
		/// <typeparam name="T"></typeparam>
		/// <param name="a"></param>
		/// <returns></returns>
		IDictionary GetEncodedActionParameters<T>(Expression<Action<T>> a);
        IDictionary GetActionParameters<T>(Expression<Action<T>> a);

		string GetControllerArea<T>() where T : Controller;
		string GetControllerName<T>() where T : Controller;
		string GetMethodName<T>(Expression<Action<T>> a);
		string GetMethodName<T>(Expression<Func<T, Action>> a);
		string GetMethodName<T, R>(Expression<Func<T, Action<R>>> a);
		string GetMethodName<T, R1, R2>(Expression<Func<T, Action<R1, R2>>> a);
		string GetMethodName<T, R1, R2, R3>(Expression<Func<T, Action<R1, R2, R3>>> a);
		string GetMethodName<T, R1, R2, R3, R4>(Expression<Func<T, Action<R1, R2, R3, R4>>> a);
	}
}
